# -*- python -*-
# Copyright (c) 2011 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import platform
import sys

Import('env')

# ----------------------------------------------------------
# The Perf Counter Library
# ----------------------------------------------------------

env.DualLibrary('nacl_perf_counter',
                ['nacl_perf_counter.c'])


# ----------------------------------------------------------
# Unit Tests
# ----------------------------------------------------------

nacl_perf_counter_test_exe = env.ComponentProgram('nacl_perf_counter_test',
    ['nacl_perf_counter_test.c'],
    EXTRA_LIBS=['nacl_perf_counter',
                'platform',
                'gio',
                ])


node = env.CommandTest(
    'nacl_perf_counter_test.out',
    command=[nacl_perf_counter_test_exe])
env.AddNodeToTestSuite(node, ['small_tests'], 'run_nacl_perf_counter_test')
